<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
    <meta charset="UTF-8">
    <title>节点创建</title>
    <script src="./../lib/jquery-3.7.0.js"></script>
    <script>
        /* ready中创建 */
        $(function () {
            let div_2 = $("<div>2</div>");
            let div = $("#con");
            div.append(div_2);  /* 向父元素追加子元素 */
        });
    </script>
</head>
<body>
<div id="con">
    <div>1</div>
</div>
</body>
</html>